#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll N=100009;
ll m,cnt[N];
void inputGenerator(){
    srand(clock());
    m=rand()%1000+1000;
    printf("%lld\n",m);
    for(ll i=1;i<=m;i++){
        ll op,val;
        op=rand()%2+1;
        val=rand()%m+1;
        printf("%lld %lld\n",op,val);
    }
}
int main(){
    freopen("mode.in","w",stdout);
    inputGenerator();
    return 0;
}